<extend name="Index::index" />
<block name="table">
<h1>用户管理</h1>
<table class="table" border="1" cellspacing="0" cellpadding="5" align="center">
			<tr>
				<th colspan="6">
				<form action="{:U('index')}" method="get">
				 	<input type="text" value="{$like}" name="like" /><button>搜索</button>
				</form>
				</th>
			</tr>

			<tr bgcolor="#ccc">
				<th>编号</th>
				<th>姓名</th>
				<th>性别</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
			<foreach name="list" item="val">
				<tr>
					<td>{$val['id']}</td>
					<td>{$val['name']}</td>
					<td>{$val['sex']}</td>
					<td>
						<if condition="$val['status'] eq 1">
							<a style="color:red" href="{:U('User/Status',['id'=>$val['id'],'status'=>$val['status']])}">
							 禁用</a>
							<else /> 
							 <a style="color:blue" href="{:U('User/Status',['id'=>$val['id'],'status'=>$val['status']])}">正常</a>
						</if>
					</td>
					<td><a style="color:red" href="{:U('del',['id'=>$val['id']])}">删除</a>|<a style="color:red" href="{:U('reset',['id'=>$val['id']])}">重置密码</a></td>
				</tr>
			</foreach>
			<tr>
				<td colspan="5">
					{$page}
				</td>
			</tr>
</table>
</block>